package com.yulongtian.interviewWorks.day20220824;

/**
 * https://leetcode.cn/problems/string-rotation-lcci
 * @author YulongTian
 * @date 2022/8/24 - 14:50
 */
public class InterviewsWork04 {
    public static void main(String[] args) {
        System.out.println(isFlipedString("aa", "aba"));
    }

    public static boolean isFlipedString(String s1, String s2) {
        int sLen1 = s1.length();
        int sLen2 = s2.length();
        if (sLen1 != sLen2) {
            return false;
        }

        StringBuffer ss2 = new StringBuffer();
        ss2.append(s2);
        ss2.append(s2);
        int flag = -1;
        flag = ss2.indexOf(s1);


        return flag != -1;


    }

}
